package com.javasm.crm.mapper.sell;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.javasm.crm.domin.vo.SellReturnOrderRecordVO;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;


import java.util.List;

/**
 * @Author：liuqizhe
 * @Version：1.0
 * @Date：2021/7/17-10:54
 * @Since:jdk1.8
 * @Description:TODO
 */
@Repository
public interface SellReturnOrderRecordVOMapper extends BaseMapper<SellReturnOrderRecordVO> {

    @Select("select r.*,s.order_state from repository_sell_return_order r left join sell_state s on r.sell_code = s.sell_code" + " ${ew.customSqlSegment}")
    List<SellReturnOrderRecordVO> getSellReturnOrderRecordVO(Page<SellReturnOrderRecordVO> page,@Param(Constants.WRAPPER) QueryWrapper<SellReturnOrderRecordVO> wrapper);
}
